<?php
/**
 * XuYuan Project
 *
 * @package	XueYuan 
 * @author	Jiuchi Team
 * @since	Version 1.0.0
 * @filesource
 */
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * The base controller for moblie terminal
 * @author Wayne Yu
 */
class Jiuchi_Controller extends CI_Controller {
	public function __construct() {
		parent::__construct();
		$this->load->library('mytoken');
		$this->load->library('apioutput');
		$this->load->library('varfilter');
		$this->load->helper('url');
	}
	
	public function checkToken($type = 1){
		$uid = $this->mytoken->userdata('uid');
		if($type == 1){
			if(empty($uid)){
				$this->apioutput->apiResponseError('请登入');
			}
		}else{
			if(!empty($uid)){
				$this->apioutput->apiResponseError('已登入');
			}
		}
	}
}